package com.lb.activity.mapper;

import com.lb.activity.po.Station;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author liubin
 */
public interface StationMapper extends Mapper<Station> {

    @Select("<script> select * from station s ,dept_station d where s.id = d.station_id  and s.status=#{status} " +
            "<if test= \"deptId != null\">" +
                "and d.dept_id = #{deptId} " +
            "</if>" +
            "</script>")
    List<Station> list(@Param("deptId") Long deptId, @Param("status") Long status);
}
